﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TR.AppService.Dto;
using TR.Domain.Entity;
using TR.Domain.Entity.Permission;
using TR.Domain.Entity.roles;
using TR.Domain.Repository.rbac_UserRepository;

namespace TR.AppService.AppService.rbac_Users
{

    public class rbac_UserAppService : Irbac_UserAppService
    {
        private readonly IMapper mapper;
        private readonly Irbac_UserRepository repository;

        public rbac_UserAppService(IMapper mapper,Irbac_UserRepository repository)
        {
            this.mapper = mapper;
            this.repository = repository;
        }
        //权限查询
        public async Task<List<Trees>> GetTreeSelect()
        {
            return await repository.TreesSelects();
        }

        //根据登录名查询全部信息
        public async Task<rbac_User> UserSelect(string uname)
        {
            return await repository.UserSelect(uname);
        }

        public async Task<List<rolesuser>> UserSelects()
        {
            return await repository.UserSelects();
        }

        public Task<DtoFenYe<rolesuser>> WHOB_FenYeSelect(int mys, int dqy, string? qsj, string? hsj, rolesuser ws)
        {
            throw new NotImplementedException();
        }
    }
}
